<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>经销商密码初始化</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript" language="javascript">
		function checkForm(){
			var pwd1 = document.getElementById("cpPass").value;
			var pwd2 = document.getElementById("newCpPass").value;
			if(pwd1==""||pwd2==""){
				alert('不能为空！');
				return false;
			}
			if(pwd1.length<6||pwd2.length<6){
				alert('密码长度必须大于6位！');
				return false;
			}
			if(pwd1.length>20||pwd2.length>20){
				alert('密码长度不能超过20位！');
				return false;
			}
			if(pwd1==pwd2){
				return true;
			}else{
				alert('两次密码输入不一致');
				return false;
			}
			return true;
		}	
	</script>
  </head>
  
  <body>
  
		<html:form action="/admin/dealer/add.do?action=edit_pwd">
		<input type="hidden" name="bkpage" value="${param['bkpage']}"/>
<input type="hidden" name="bkisCommend" value="${param['isCommend']}"/>
<input type="hidden" name="bkifCheck" value="${param['ifCheck']}"/>
<input type="hidden" name="bkhyType" value="${param['hyType']}"/>
<input type="hidden" name="bkprovId" value="${param['provId']}"/>
<input type="hidden" name="bkcityId" value="${param['cityId']}"/>
<input type="hidden" name="bkqyjb_cpName" value="${qyjb_cpName}"/>
			<table>
			<tr>
				<td>经销商ID：${singleDealer.userid} <html:hidden property="userid" value="${singleDealer.userid}"/> </td>
			</tr>
			<tr>
				<td>经销商名称：${singleDealer.cpName}</td>
			</tr>
			<tr>
				<td>新密码：&nbsp;<html:password property="cpPass" value=""></html:password></td>
			</tr>
			<tr>
				<td>重复密码：<html:password property="newCpPass" value=""></html:password></td>
			</tr>
			<tr>
				<td><html:submit value="确定修改" onclick="return checkForm();"></html:submit>
				&nbsp;<html:reset value="重置" /></td>
			</tr>
			</table>
		</html:form>
  </body>
</html:html>
